from django.contrib import admin

# Register your models here.
#首先导包
from backend import models

class StudentAdmin(admin.ModelAdmin):
    list_display = ['id','name','sex','age','class_null','description']
    list_filter = ['name']
    list_editable = ['name','sex','age','class_null','description']

admin.site.register(models.Student, StudentAdmin)


from .models import Course


# Register your models here.

@admin.register(Course)
class CourseAdmin(admin.ModelAdmin):
    list_display = ('name', 'introduction', 'teacher', 'price')
    search_fields = list_display
    list_filter = list_display
